function dlgopen22()
{
	var obj=window.parent.document.getElementById('sjr')
	var fsms=window.parent.document.getElementById('fsms')
	var arry=new Array();
	arry[0]=obj;
	arry[1]=fsms;
	//alert(obj)
	//J.dialog.get({ id: 'test2', title: '通讯录', page: '../message/txl_hy.html',width:470,rang:true,drag:false,noresize:true,skin:'xxt',custom:arry});
	  J.dialog.get( 'test2', {title:'通讯录',page: '../message/txl.html',width:470,skin:'xxt',rang:true,custom:arry} );
	 //setTimeout("J.dialog.inwin['test2'].cancel()",1000);自动关闭弹出层
}

function xtmb()
{
	J.dialog.get( 'xtmb', {title:'系统模板', page: '../message/xtmb.html',width:470,rang:true,drag: true,skin:'xxt'} );
	}
function queding(){
	//get_pageid();
	var namelist=''
	var trs=window.frames['txl'].document.getElementById('cov').getElementsByTagName('tr');
	for(i=1;i<trs.length;i++){
			inputs=trs[i].getElementsByTagName('input');
			tds=trs[i].getElementsByTagName('td');
			if(inputs[0].checked==true){
				namelist+=tds[1].innerHTML+',';
				}
		}
	var len=namelist.length;
	namelist=namelist.substring(0,len-1)
	P.A().custom[0].innerHTML+=namelist;
	P.cancel();//关闭层
	}
function get_pageid(){
	if(document.getElementById('hy_body')){selname('hy_body')}
	}
function selname(s){
	var k=0;
	//var endmailname=''
	var mailname=new Array();
	var mailid=new Array();
	//alert(s)
	var trs=document.getElementById(s).getElementsByTagName('tr');
	//alert(trs.length)
	for(i=1;i<trs.length;i++){
		if(trs[i].getElementsByTagName('input')[0].checked==true){
			var tds=trs[i].getElementsByTagName('td')
			mailname[k]=tds[1].innerHTML;
			k++
			}
		}
	//for(i=0;i<mailname.length;i++){endmailname+=mailname[i]+','}
	endmailname=mailname.join(',')
	//alert(endmailname)
	if(P.custom[0].innerHTML!=''){P.custom[0].innerHTML+=','}
	P.custom[0].innerHTML+=endmailname;
	}
/**清空收件人**/
function clearsjr(s){
	//alert(s);
		document.getElementById(s).innerHTML="";
	}
function changedx()  	//让省外短信 短信回复 私人留言 定时发送处于未被选中状态
	{
		document.getElementById('swdx').checked=false;
		document.getElementById('dxhf').checked=false;
		document.getElementById('srly').checked=false;
		document.getElementById('dsfs').checked=false;
		document.getElementById('time').style.display='none';
		}
function testdx(){		//检查发送是否选上
		//alert('1')
		if(document.getElementById('fsdx').checked){return true;}
		else{alert('请先选择发送短信!');
		return false;}
	}
function showtime(){
	//if(this.cheked) alert('1');
	if(document.getElementById("dsfs").checked){
		if(document.getElementById('fsdx').checked){
			document.getElementById('time').style.display='block';
			return true;}
			else{
				alert("请先选择发送短信!");
				return false;		
			}
		}
	else 
		{document.getElementById('time').style.display='none';}
	}
function resetly(){  //重置按钮
	document.getElementById('time').style.display='none';
	document.getElementById('dsfs').checked=false;
	}	
function selectall(ch,tbody)  //全选
{
	//alert(check+'\n'+tbody);

   var a = document.getElementById(tbody).getElementsByTagName("input");
   //alert(a.length);
   //alert(a.length);
   if(ch.checked!=true){//alert('true')
   for (i=0; i<a.length; i++) 
      if (a[i].type == "checkbox") a[i].checked = false;
   //alert(ch.checked);
   }
   else
   {
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   }
}	
function selectall2(ch,tbody)  //全选
{
	//alert(check+'\n'+tbody);

   var a = document.getElementById(tbody).getElementsByTagName("input");
   //alert(a.length);
   //alert(a.length);
   if(ch.checked!=true){//alert('true')
   for (i=3; i<a.length; i++) 
      if (a[i].type == "checkbox") a[i].checked = false;
   //alert(ch.checked);
   }
   else
   {
   for (var i=3; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   }
}	


/*********显示回复**********/
function xshf(s){
	//alert(s);
	document.getElementById(s).style.display="block";
	}
/*********隐藏回复**********/
function quxiao(s){
	//alert(s);
	document.getElementById(s).style.display="none";
	}



/************表格*********************************/
function mosover(s){
	nbsp(s);
	var trs=document.getElementById(s).getElementsByTagName('tr');
	//alert(trs.length)
	for(i=0;i<trs.length;i++){
		trs[i].onmouseover=function(){
			this.className='mosover';
			}
		trs[i].onmouseout=function(){
			this.className='mosout';
			}
		}
	}
 /******************div-height**********************/
function ifover(s){
	//alert(document.getElementById(s).offsetHeight);
	if(document.getElementById(s).offsetHeight>200){
		document.getElementById(s).style.height=200;		
		}	
	}
function ifover2(s1,s2){
	//alert(document.getElementById(s).offsetHeight);
	if(document.getElementById(s1).offsetHeight>150){
		document.getElementById(s1).style.height=150;		
		}
	if(document.getElementById(s2).offsetHeight>170){
		document.getElementById(s2).style.height=170;		
		}
	}	
	
/***************选择课程**********************************/
function lilisten(ul_id){    //为每个li添加onclick事件dlgopen23()  但在FF中this传不过去
		var lis=document.getElementById(ul_id).getElementsByTagName("li");
		//alert(lis.length);
		for(i=0;i<lis.length;i++){
			if(window.addEventListener){ 
				lis[i].setAttribute('onclick',dlgopen23(this));
			} else {
				lis[i].attachEvent('onclick',function(){dlgopen23(event.srcElement)});
			}
			}
	}

function dlgopen23(s)
{
	//J.dialog.get({ id: 'xxt_js', title: '教师',width:450, page: '../manage/teacherlist.html',rang:true,nofoot:true,custom:s});
	J.dialog.get( 'xxt_js', {title:'教师',page: '../manage/teacherlist.html',width:470,skin:'xxt',rang:true,custom:s} );
}	

function choseteach(){
		 var td=document.getElementById("teacherlist").getElementsByTagName('li');
		for(i=0;i<td.length;i++){
			td[i].onmouseover=function(){this.className='mouson'}
			td[i].onmouseout=function(){this.className='mousout'}
			if(window.addEventListener){ 	
		//其它浏览器的事件代码: Mozilla, Netscape, Firefox		
		//添加的事件的顺序即执行顺序	
			td[i].setAttribute('onclick','sendvalue(this)');
		   } else {		
		//IE 的事件代码		
				td[i].attachEvent('onclick',function(){sendvalue(event.srcElement)});
			}
		}	
	}
function choseteach2(){
		 var td=document.getElementById("teacherlist2").getElementsByTagName('input');
		 //alert(td.length)
		for(i=0;i<td.length;i++){
			//td[i].onmouseover=function(){this.className='mouson'}
			//td[i].onmouseout=function(){this.className='mousout'}
			if(window.addEventListener){ 	
		//其它浏览器的事件代码: Mozilla, Netscape, Firefox		
		//添加的事件的顺序即执行顺序	
			td[i].setAttribute('onclick','return teachers(this)');
		   } else {		
		//IE 的事件代码		
				td[i].attachEvent('onclick',function(){return teachers(event.srcElement)});
			}
		}	
	}
function chosegrade(){
		 var td=document.getElementById("gradelist").getElementsByTagName('td');
		for(i=0;i<td.length;i++){
			td[i].onmouseover=function(){this.className='mouson'}
			td[i].onmouseout=function(){this.className='mousout'}
			if(window.addEventListener){ 	
		//其它浏览器的事件代码: Mozilla, Netscape, Firefox		
		//添加的事件的顺序即执行顺序	
			td[i].setAttribute('onclick','sendvalue2(this)');
		   } else {		
		//IE 的事件代码		
				td[i].attachEvent('onclick',function(){sendvalue2(event.srcElement)});
			}
		}	
	}
function choseteacher_1(){
		 var td=document.getElementById("teacher_list_1").getElementsByTagName('td');
		for(i=0;i<td.length;i++){
			td[i].onmouseover=function(){this.className='mouson'}
			td[i].onmouseout=function(){this.className='mousout'}
			if(window.addEventListener){ 	
		//其它浏览器的事件代码: Mozilla, Netscape, Firefox		
		//添加的事件的顺序即执行顺序	
			td[i].setAttribute('onclick','sendvalue_4(this)');
		   } else {		
		//IE 的事件代码		
				td[i].attachEvent('onclick',function(){sendvalue_4(event.srcElement)});
			}
		}	
	}
function setnone(){ //将教师设为'无'
	P.A().custom.innerHTML='无';
	P.cancel();
	alert('不设置教师_ID')
	}
function sendvalue_4(e){
	//alert(e.innerHTML)
	var val=e.getElementsByTagName('input')[0].value
	var arry=new Array();
	var end=0;
	var endvalue='';
	for(i=0;i<e.innerHTML.length;i++){
		arry[i]=e.innerHTML.toString().charAt(i);
		if(arry[i]=="("){end=i;}
		}
		//alert(end)
	for(i=0;i<end;i++){endvalue+=arry[i];}
	//alert(val)
	P.A().custom.innerHTML=endvalue;
	P.cancel();	
	
	}
function sendvalue(e)           //保存
	{
		P.A().custom.value=e.innerHTML;
		P.cancel();
	}	
function sendvalue2(e)           //保存
	{	
		P.A().custom.innerHTML=e.innerHTML;		
		var val=e.getElementsByTagName('input')[0].value;
		//alert(e.getElementsByTagName('input').length)
		//alert(val)
		P.cancel();
	}
function teachers(){
	//alert('1')
	var td=document.getElementById("teacherlist2").getElementsByTagName('input');
	var num=0;
	//return false;
	for(i=0;i<td.length;i++){
		if(td[i].checked!=false){num++;}
	}			
	if(num>2){alert('每门课程最多只能有两位老师!');return false;}
}
/*********************动态add-row*************************************/
function showfirstrow(s){					//show first row
		document.getElementById(s).getElementsByTagName('table')[0].getElementsByTagName('tbody')[1].getElementsByTagName('tr')[0].style.display="";
	}				
function addlist(thisid,divid,showtime1,showtime2){              //main function
		//alert(thisid.value);	
		var trs=document.getElementById(divid).getElementsByTagName('table')[0].getElementsByTagName('tbody')[1].getElementsByTagName('tr');
		var trslength=trs.length;
		deltr(divid,trslength);
			for(j=0;j<thisid.value-1;j++)
		{
			//alert('2');
			createtr(divid,showtime1,showtime2);
			}
		ifover(divid);
	}
function addlist3(thisid,divid){              //main function
		//alert(thisid.value);	
		var trs=document.getElementById(divid).getElementsByTagName('table')[0].getElementsByTagName('tbody')[1].getElementsByTagName('tr');
		var trslength=trs.length;
		deltr(divid,trslength);
			for(j=0;j<thisid.value-1;j++)
		{
			//alert('2');
			createtr2(divid);
			}
		ifover(divid);
	}
function createtr(divid,showtime1,showtime2){                     //addrow
	//alert(s.value)
	var tbod=document.getElementById(divid).getElementsByTagName('table')[0].getElementsByTagName('tbody');
	var trs=document.getElementById(divid).getElementsByTagName('table')[0].getElementsByTagName('tbody')[1].getElementsByTagName('tr');
	var tds=trs[0].getElementsByTagName('td');
	var newtr=document.createElement('tr');
	var cells=new Array();
	var txt=new Array();
	//alert(cells.length)
	for(i=0;i<tds.length;i++){
		cells[i]=document.createElement('td');
		cells[i].innerHTML=tds[i].innerHTML;
		cells[i].setAttribute('align','center');
		newtr.appendChild(cells[i]);
		}
	if(showtime1){	 ///////////if showtime1 no null
	if(window.addEventListener){ 
	
	//其它浏览器的事件代码: Mozilla, Netscape, Firefox
	
	//添加的事件的顺序即执行顺序

		cells[showtime1].getElementsByTagName('input')[0].setAttribute('onclick','showcalendar(event, this)');
	   } else {
	
	//IE 的事件代码
	
			cells[showtime1].attachEvent('onclick',  function(){showcalendar(event, this)});
	
		}}
		if(showtime2){	///if showtime2 no null
		if(window.addEventListener){ 
		
		//其它浏览器的事件代码: Mozilla, Netscape, Firefox
		
		//添加的事件的顺序即执行顺序
	
			cells[showtime2].getElementsByTagName('input')[0].setAttribute('onclick','showcalendar(event, this)');
		   } else {
		
		//IE 的事件代码
		
				cells[showtime2].attachEvent('onclick',  function(){showcalendar(event, this)});
		
			}}
	

	cells[tds.length-1].setAttribute('style','border-right:none');
	tbod[1].appendChild(newtr);
	//alert(tds.length);
	//alert(trs[0].getElementsByTagName('td')[1].innerHTML);
	}
function createtr2(divid){                     //addrow
	//alert(divid)
	var tbod=document.getElementById(divid).getElementsByTagName('table')[0].getElementsByTagName('tbody');
	var trs=document.getElementById(divid).getElementsByTagName('table')[0].getElementsByTagName('tbody')[1].getElementsByTagName('tr');
	var tds=trs[0].getElementsByTagName('td');
	//alert(tds.length)
	var newtr=document.createElement('tr');
	var cells=new Array();
	var txt=new Array();
	//alert(cells.length)
	for(i=0;i<tds.length;i++){
		cells[i]=document.createElement('td');
		cells[i].innerHTML=tds[i].innerHTML;
		cells[i].setAttribute('align','center');
		newtr.appendChild(cells[i]);
		}
	if(window.addEventListener){ 
	
	//其它浏览器的事件代码: Mozilla, Netscape, Firefox
	
	//添加的事件的顺序即执行顺序

		cells[1].setAttribute('onclick','showgreatename(this)');
		cells[2].setAttribute('onclick','showteacherlist(this)');
	   } else {
	
	//IE 的事件代码
	
			cells[1].attachEvent('onclick',  function(){showgreatename(event.srcElement)});
			cells[2].attachEvent('onclick',  function(){showteacherlist(event.srcElement)});
	
		}
	

	cells[tds.length-1].setAttribute('style','border-right:none');
	tbod[1].appendChild(newtr);
	//alert(tds.length);
	//alert(trs[0].getElementsByTagName('td')[1].innerHTML);
	}
function showteacherlist(s){
	//J.dialog.get({ id: 'xxt_js', title: '教师',width:450, page: '../manage/teacherlist3.html',rang:true,nofoot:true,custom:s});
	J.dialog.get( 'xxt_js', {title:'教师',page: '../manage/teacherlist3.html',width:470,skin:'xxt',rang:true,foot:false,custom:s} );
	}
function showgreatename(m){
	//J.dialog.get({ id: 'xxt_grade', title: '年级',width:450, page: '../manage/gradelist.html',nofoot:true,custom: m});
	 J.dialog.get( 'xxt_grade', {title:'年级',page: '../manage/gradelist.html',width:470,skin:'xxt',rang:true,foot:false,custom: m} );
	}
function deltr(divid,trslength){      //del row
	var tbod=document.getElementById(divid).getElementsByTagName('table')[0].getElementsByTagName('tbody');
	//alert(trs.length);
	for(i=0;i<trslength-1;i++){
		//alert('1')
		tbod[1].deleteRow(0,0);
		}
	}
function addlist2(thisid,divid){              //main function
		//alert(thisid.value);	
			for(j=0;j<thisid.value;j++)
		{
			//alert('2');
			createtr(divid);
			}
		ifover(divid);
	}
	
function clearkebiao(kebiaoid){				//清空课表
	var tds=document.getElementById(kebiaoid).getElementsByTagName('input');
	//alert(tds.length);
	for(i=0;i<tds.length;i++){tds[i].value='';}	
	}
function clearkecheng(){                 //清空课程
	var tds,inputs,tals;
	var lis=document.getElementById('banjikaike').getElementsByTagName('li');
	for(i=0;i<lis.length;i++){
		inputs=lis[i].getElementsByTagName('input');  //获取input
		inputs[0].checked=false;			//将复选框置空
		tals=lis[i].getElementsByTagName('table');
		tals[1].style.display='none';    //将table隐藏
		tds=tals[1].getElementsByTagName('td');
		tds[1].innerHTML='请选择教师';		//将原td中的值还原为初始值
		}
	}
function slecttecher(s){
	var checks=s;
	//alert(s.id)
	//alert(checks);
	var par=s.parentNode.parentNode.parentNode; //获取li下的大table
	//alert(par.innerHTML)
	var tals=par.getElementsByTagName("table");
	//alert(tals.length)
		if(s.checked!=true){//alert('true')	   	
		var tds=tals[0].getElementsByTagName('td');
		//alert(tds[1].innerHTML);
		tds[1].innerHTML='请选择教师';
		tals[0].style.display='none';
	   //alert('true');
	   closdlg();   //关闭弹出窗口
	   }
	   else
	   {
	   //alert('false')
	   tals[0].style.display='';
	   dlgopen24(par);
	   }
	}
function findparent(s){          //找到和slecttecher中传给dlgopen24函数的相同的参数节点
		var par=s.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
		dlgopen24(par);
	}
function dlgopen24(m)
{
	//alert(m.innerHTML)
	//J.dialog.get({ id: 'xxt', title: '教师',width:450, page: '../manage/teacherlist2.html',custom: m});
	J.dialog.get( '123456', {title:'教师', page: '../manage/teacherlist2.html',width:470,rang:true,drag: true,skin:'xxt',custom:m} );
}	
function closdlg()
{
    J.dialog.close('xxt'); //为打开窗口的id
}
function savechange(){  //班级开课中弹出窗口确定按钮事件
	//alert('确定')
	var arry=new Array();
	var arry2=new Array();
	var start,end;
	var checkobj;
	var theend='';
	var teachername='';
	var checks=document.getElementById("teacherlist2").getElementsByTagName('input');
	//alert(checks.length)
	for(i=0;i<checks.length;i++){
		var newstring=''
		if(checks[i].checked!=false){
			//alert('1')
			//alert(checks[i].parentNode.innerHTML)
			checkobj=checks[i].parentNode.innerHTML;
				for(j=0;j<checkobj.length;j++)
					{arry[j]=checkobj.toString().charAt(j);}
				for(j=0;j<checkobj.length;j++){
						if(arry[j]=='>'){start=j+1;}
						if(arry[j]=='('){end=j;}
					}
				if(!start){start=0;}
				if(!end){end=checkobj.length;}
				for(k=start;k<end;k++){
						newstring+=arry[k];
					}
				teachername+=newstring+',';
				//alert(teachername)
			}
		}
	//alert(teachername)
	for(l=0;l<teachername.length-1;l++){
			theend+=teachername.toString().charAt(l);
		}
	//alert(theend)
	var tds=P.A().custom.getElementsByTagName('table')[0].getElementsByTagName('td');
	tds[1].innerHTML=theend;
	P.cancel();//关闭弹出窗口
	}
	
function kemuclick(){
	//alert('1')
	var lis=document.getElementById('banjikaike').getElementsByTagName('li')
	//alert(lis.length)
	for(i=0;i<lis.length;i++){
			var inputs=lis[i].getElementsByTagName('input');
			//alert(inputs.length);
			if(window.addEventListener){ 
		
		//其它浏览器的事件代码: Mozilla, Netscape, Firefox
		
		//添加的事件的顺序即执行顺序
	
			inputs[0].setAttribute('onclick','slecttecher(this)');
			inputs[1].setAttribute('onclick','findparent(this)');
		   } else {
		
		//IE 的事件代码
		
			inputs[0].attachEvent('onclick',  function(){slecttecher(event.srcElement)});
			inputs[1].attachEvent('onclick',  function(){findparent(event.srcElement)});
			}
		}
	
	}
function changeday(s,this_value){
		var inputs=document.getElementById(s).getElementsByTagName('input');
		for(i=0;i<inputs.length;i++){
			inputs[i].disabled=false;
			}
		inputs[this_value.value].disabled=true;
	}
function nbsp(s){
	if(document.getElementById(s).getElementsByTagName('td')){
	var tds=document.getElementById(s).getElementsByTagName('td');
	for(i=0;i<tds.length;i++){
		if(tds[i].innerHTML.trim()==''){tds[i].innerHTML="&nbsp;"}
		}
	}else{return;}
}


function movediv(s1,s2) {
	var wrap = document.getElementById(s1);
	document.getElementById(s2).style.cursor ="move";
	if (window.ActiveXObject)
	  wrap.onselectstart = function () { event.returnValue = false; }
	document.onmousedown = function (evt) {
	  evt = window.event||evt; 
	  var a=getAbsoluteCoords(wrap);
	  wrap.cx=evt.clientX-a.left;
	  wrap.cy=evt.clientY-a.top;
	  document.onmousemove = function (evt) {
		evt = window.event||evt; try {
			wrap.style.left = (evt.clientX-wrap.cx)+"px";
			wrap.style.top = (evt.clientY-wrap.cy)+"px";
		} catch (ex) {};
	  };
		 document.onmouseup = function () {
		document.onmousemove = null;
		document.onmouseup = null;
		wrap.style.cursor="default";
	  }
	}
  }
function mosout()
  {
  document.onmousedown=null;
  document.onmousemove = null;
  document.onmouseup = null;
  //wrap.style.cursor="default";
  }

  
 /**************让按钮过几秒才能再点击***************************/
 var pushid=''; 
 function set(s){
	 pushid=s;
	var test=document.getElementById(s);
	test.style.cursor='auto';
	if(window.addEventListener){
		test.addEventListener('click',onclic,false)
	}
	else{
		test.attachEvent('onclick',onclic)
	}
}
 function onclic(){
 	var test=document.getElementById(pushid);
	test.style.cursor='not-allowed';
 	alert(pushid);
	removeListener();
	setTimeout(resetit,2000)
 }
 function removeListener(){
 		alert(pushid)
		if(window.addEventListener){
			document.getElementById(pushid).removeEventListener('click',onclic,false)
		}
		else{
			//alert(e.parent.innerHTML)
			document.getElementById(pushid).detachEvent('onclick',onclic)
		}
	}
function resetit(){
	var test=document.getElementById(pushid);
	test.style.cursor='auto';
	if(window.addEventListener){
		test.addEventListener('click',onclic,false)
		}
	else{
		test.attachEvent('onclick',onclic)
		}
	}
function changemenu(e){
	var lis=document.getElementById('menu').getElementsByTagName('li')
	//alert(lis.length)
	//alert(e.innerHTML)
	for(i=0;i<lis.length;i++){
		lis[i].className='out';
		}
	e.className='list';
	}
function outoftime(){   //超时提示
	var htmlbody=parent.parent.parent.parent.parent.parent.document.body;
	var outtime_div=document.createElement('div');
	//outtime_div.setAttribute('style',' height:100%; width:100%; position:absolute; left:0px; top:0px;z-index:3000;background:#999999');
	outtime_div.id="outtime_div"
	outtime_div.style.height="100%";
	outtime_div.style.width="100%";
	outtime_div.style.position="absolute";
	outtime_div.style.left="0";
	outtime_div.style.top="0";
	outtime_div.style.zIndex="3000";
	htmlbody.appendChild(outtime_div)
	var table_top=(htmlbody.clientHeight-174)/2+'px';
	var table_left=(htmlbody.clientWidth-412)/2+'px';
	//alert(table_top+"\n"+table_left)
	var outtime_string='<iframe scrolling="no" frameborder="0" width="100%" height="100%" style="filter:alpha(opacity=10); z-index:3000;"></iframe><div id="covBg" style="height:100%; width:100%; position:absolute; left:0px; top:0px;z-index:3100; background:#000000;filter:alpha(opacity=10);-moz-opacity:0.1;opacity:0.1;"></div><div style="height:174px; width:412px; position:absolute; left:'+table_left+';top:'+table_top+';z-index:3200; background:#f4fee3; border:#b3d08e 1px solid"><table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%" anlig="center"><tr><td width="100%" style="font-family:\'楷体_GB2312\';font-size:14px; color:#c65644; padding:13px 0 0 40px; height:20px; width:100%; font-weight:bolder;">校讯通提醒您：</td></tr><tr><td style=" height:10px; width:100%; line-height:10px; padding:0px 20px;"><hr style=" color:#99b179; height:1px; line-height:1px;"/></td></tr><tr><td align="center" valign="middle">登录超时，请您重新登录！</td></tr><tr><td align="right" style="padding:0 30px 5px 0; height:30px;"><input type="button" value="确&nbsp;定" onClick="window.location.href=\'login.html\'"></td></tr></table></div>';
	//alert(outtime_string)
	outtime_div.innerHTML=outtime_string;
	}
function open_txl_xs()
{
	var obj=window.parent.document.getElementById('sjr')
	var fsms=window.parent.document.getElementById('fsms')
	var arry=new Array();
	arry[0]=obj;
	arry[1]=fsms;
	  J.dialog.get( 'test2', {title:'通讯录',page: '../message/txl2.html',width:470,skin:'xxt',rang:true,custom:arry} );
}

function open_txl_xs2()
{
	var obj=window.parent.document.getElementById('sjr')
	var fsms=window.parent.document.getElementById('fsms')
	var selectvalue=window.parent.document.getElementById('classselcet').value
	var arry=new Array();
	arry[0]=obj;
	arry[1]=fsms;
	arry[2]=selectvalue;
	  J.dialog.get( 'test2', {title:'通讯录',page: '../message/txl2.html',width:470,skin:'xxt',rang:true,custom:arry} );
}


String.prototype.trim = function() {  
     var r = this.replace(/(^\s*)|(\s*$)/g, "");  
     r = Lremoveblank(r);  
     r = Rremoveblank(r);  
     return r;  
 }  
   
 function Lremoveblank(s) {  
     if (s.length == 1 && s.charCodeAt(0) == 160)  
         return "";  
     if (s.charCodeAt(0) == 160) {  
         s = s.substr(1, s.length - 1);  
         return removeblank(s);  
     }  
     else {  
         return s;  
     }  
 }  
   
 function Rremoveblank(s) {  
     if (s.length == 1 && s.charCodeAt(0) == 160)  
         return "";  
     if (s.charCodeAt(s.length-1) == 160) {  
         s = s.substr(0, s.length - 1);  
         return Rremoveblank(s);  
     }  
     else {  
         return s;  
     }  
 }  
   
 //--去字符两端空格 结束  
   